﻿using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using SingleUserMall.Authorization.Users;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SingleUserMall.Orders.VO
{
    [AutoMapFrom(typeof(GroupOrder))]
    public class GroupOrderMiniVO:EntityDto<long>
    {
        internal User inUser { get; set; }
        /// <summary>
        /// 发起人头像
        /// </summary>
        public string Avatar => inUser?.Avatar;
        /// <summary>
        /// 发起人姓名
        /// </summary>
        public string Name => inUser?.Name;
        /// <summary>
        /// 开团时间
        /// </summary>
        public DateTime BeginTime { get; set; }
        /// <summary>
        /// 截止时间
        /// </summary>
        public DateTime EndTime { get; set; }
        /// <summary>
        /// 拼单数量
        /// </summary>
        public int TotalCount { get; set; }
        /// <summary>
        /// 参团数量
        /// </summary>
        public int PartinCount { get; set; }
        /// <summary>
        /// 团购状态（-1：撤销，0：初始化，1：组团中，2：成功）
        /// </summary>
        public GroupOrderStatus Status { get; set; }
    }
}
